#include <stdio.h>
int gcd(int a, int b) {
    while (b != 0) {
        int temp = b;
        b = a % b;
        a = temp;
    }
    return a;
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}

int main() {
    int num1, num2;
    printf("请输入两个正整数：");
    scanf("%d %d", &num1, &num2);
    
    int gcdResult = gcd(num1, num2);
    int lcmResult = lcm(num1, num2);
    
    printf("最大公约数：%d\n", gcdResult);
    printf("最小公倍数：%d\n", lcmResult);
    
    return 0;
}